public class PdfToWordConverter implements Converter {
    @Override
    public boolean support(String sourceFormat, String targetFormat) {
        return "pdf".equals(sourceFormat) && "docx".equals(targetFormat);
    }
    
    @Override
    public void convert(File source, File target) throws ConversionException {
        try {
            // 这里使用 Apache PDFBox 示例
            PDDocument document = PDDocument.load(source);
            Writer output = new PrintWriter(target, "utf-8");
            new PDFTextStripper().writeText(document, output);
            document.close();
            output.close();
        } catch (IOException e) {
            throw new ConversionException("PDF转Word失败", e);
        }
    }
} 